import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/home/index'
  },
  {
    path: '/home',
    name: 'home',
    component: HomeView,
    children:[
      {
        path:'index',
        name:'/home/index',
        component:()=>import('../views/Index.vue'),
        children:[
          {
            path:'shanghai',
            name:'/home/index/shanghai',
            component:()=>import('../views/Shanghai.vue')
          },
          {
            path:'beijing',
            name:'/home/index/beijing',
            component:()=>import('../views/Beijing.vue')
          },
          {
            path:'shenzhen',
            name:'/home/index/shenzhen',
            component:()=>import('../views/Shenzhen.vue')
          },
          {
            path:'guangzhou',
            name:'/home/index/guangzhou',
            component:()=>import('../views/Guangzhou.vue')
          },
          {
            path:'chongqing',
            name:'/home/index/chongqing',
            component:()=>import('../views/Chongqing.vue')
          },
          {
            path:'hangzhou',
            name:'/home/index/hangzhou',
            component:()=>import('../views/Hangzhou.vue')
          },
          {
            path:'chengdu',
            name:'/home/index/chengdu',
            component:()=>import('../views/Chengdu.vue')
          },
          {
            path:'nanjing',
            name:'/home/index/nanjing',
            component:()=>import('../views/Nanjing.vue')
          },
          {
            path:'wuhan',
            name:'/home/index/wuhan',
            component:()=>import('../views/Wuhan.vue')
          },
          {
            path:'suzhou',
            name:'/home/index/suzhou',
            component:()=>import('../views/Suzhou.vue')
          },
        ]
      },
    ]
  },

]

const router = new VueRouter({
  routes
})

export default router
